ActionController::Routing::Routes.draw do |map|

    map.home '', :controller => 'default', :action => 'index'
    map.open_id_complete 'session', :controller => 'session', :action => 'create', :requirements => { :method => :get }
    map.resources :users, :member => { :admin => :post } do |user|
        user.resources :aggregations, :collection => { :manage => :get, :all => :get, :read => :get, :marked => :get, :all_photos => :get, :marked_photos => :get, :read_photos => :get }, 
                                                        :member => {:show_marked => :get, :associate_feed => :post, :remove_feed => :get, :photos => :get}
        user.resources :marked_entries
    end
    map.resources :aggregations, :collection => { :discover => :get } do |aggregation|
        aggregation.resources :feeds, :collection => { :filter => :get, :search => :post, :new_too => :get, :show_feeds => :get }, :has_many => :entries
    end
    
    map.resources :aggregations, :member => { :duplicate => :get, :bookmarks => :get}
    map.resources :feeds
    map.resources :entries, :member => {:mark_entry => :get}    
    map.resource :session
    
    map.signup   'signup',        :controller => 'users',   :action => 'new'
    map.settings 'settings',      :controller => 'users',   :action => 'edit'
    map.activate 'activate/:key', :controller => 'users',   :action => 'activate'
    map.login    'signin',         :controller => 'session', :action => 'new'
    map.login    'login',         :controller => 'session', :action => 'new'
    map.logout   'logout',        :controller => 'session', :action => 'destroy'
    map.logout   'signout',        :controller => 'session', :action => 'destroy'
    
    map.connect ':controller/service.wsdl', :action => 'wsdl'
    map.connect ':controller/:action/:id.:format'
    map.connect ':controller/:action/:id'

    map.exceptions 'logged_exceptions/:action/:id', :controller => 'logged_exceptions', :action => 'index', :id => nil
end
